<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
       xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
       xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://java.sun.com/jsf/facelets">

<h:head>
<link href="../resources/css/main.css" rel="stylesheet" type="text/css" />
</h:head>

<body>
<div class="contenitore">
 		<div class="riga">
  			<div class="colonna-1">
				<img id="immagine" src="../resources/images/logo.jpg" alt="" />
				
  			</div>
  			<div class="colonna-1-2">
  				<h1>Administration Panel</h1>	
 				<h:outputText id="welcometext" value="Pannello dedicato alla gestione e creazione dei contenuti del sito TravelDream"></h:outputText>
  			</div>
 		</div>
 		
 		<div id="riga2">
  			<div class="colonna-2-1">
  				<h:form>
						<p:commandButton action="#{logoutBean.logout}" value="Logout" />
				</h:form>
  			</div>
  			<div class="colonna-2-2">
  				<div id="standard"> 
   <h:form>
		<div id="standardpackage">
             <p:panel header="Creazione Pacchetto Completo">
				<h:panelGrid columns="2" id="regGrid" >
		     		        
		     		<h:outputLabel for="nome">Nome:</h:outputLabel>
					<p:inputText id="nome" value="#{packageBean.current.nome}"/>
						 
	   				<h:outputLabel for="descrizione"> Descrizione:</h:outputLabel>
					<p:inputTextarea rows="6" cols="33" id="descrizione" value="#{packageBean.current.descrizione}" />
					
					<h:outputLabel for="durataViaggio">Durata Viaggio:</h:outputLabel>								
					<p:inputText id="durataViaggio" value="#{packageBean.current.durataViaggio}"/>
				
	                <h:outputLabel for="citta">Città:</h:outputLabel>								
					<p:inputText id="citta" value="#{packageBean.current.citta}"/>	
				
					<h:outputLabel for="disponibile">Disponibile:</h:outputLabel>
		   			<p:inputText id="disponibile" value="#{packageBean.current.disponibile}"/>
		        
		        	<h:outputLabel for="inOfferta">inOfferta:</h:outputLabel>
		        	<p:inputText id="inOfferta" value="#{packageBean.current.inOfferta}"/>
		        	
		        	<h:outputLabel>Hotel:</h:outputLabel>		
 		     		<p:selectManyMenu value="#{packageBean.current.selectedHotels}" style="width:150px;height:150px">	
		     			<f:selectItems value="#{gestioneShowHotelLocal.hotels}" var="h" itemLabel="#{h.name}" itemValue="#{h.id}"/>  
        			</p:selectManyMenu>
        			
        			<h:outputLabel>Andata:</h:outputLabel>
        			<p:selectManyMenu value="#{packageBean.current.selectedAndata}" style="width:150px;height:150px">  
				    	<f:selectItems value="#{gestioneShowTransportLocal.transports}" var="va" itemLabel="#{va.nome}" itemValue="#{va.id}"/>  
       				</p:selectManyMenu>
       				
       				<h:outputLabel>Ritorno:</h:outputLabel>
     				<p:selectManyMenu value="#{packageBean.current.selectedRitorno}" style="width:150px;height:150px">  
         				<f:selectItems value="#{gestioneShowTransportLocal.transports}" var="vr" itemLabel="#{vr.nome}" itemValue="#{vr.id}"/>  
      			    </p:selectManyMenu>
      			    
      			    <h:outputLabel>Escursioni:</h:outputLabel>
      				<p:selectManyMenu value="#{packageBean.current.selectedExcursions}" style="width:200px;height:150px">  
         				<f:selectItems value="#{gestioneShowExcursionLocal.excursions}" var="e" itemLabel="#{e.name}" itemValue="#{e.id}"/>  
      				</p:selectManyMenu>
      				
      				<p:commandButton value="Create" action="#{packageBean.create()}"/>
		     	
				</h:panelGrid>
			</p:panel> 
		</div>
	 </h:form>	    
 </div>
  				
  				
  			</div>
  			<div class="colonna-2-3">
  				<h:panelGrid columns="1" cellpadding="10">
  					<h:form>
      				<p:commandButton id="button" action="showhotel" value="Mostra tutti gli Hotel" ajax="false"/>
      				<p:commandButton action="showtransport" value="Mostra tutti i Trasporti" ajax="false"/>
      				<p:commandButton action="showexcursion" value="Mostra tutte le Escursioni" ajax="false"/>
      				<p:commandButton action="showpacchetto" value="Mostra tutti i Pacchetti" ajax="false"/>
      				</h:form>
      			</h:panelGrid>
      			<h:panelGrid columns="1" cellpadding="10">
      				<h:form>
      				<p:commandButton action="creahotel" value="+Crea Hotel" ajax="false"/>
      				<p:commandButton action="creatrasporto" value="+Crea Trasporto" ajax="false"/>
      				<p:commandButton action="creaescursione" value="+Crea Escursione" ajax="false"/>
      				<p:commandButton action="creapacchetto" value="+Crea Pacchetto" ajax="false"/>
      				</h:form>
      			</h:panelGrid>
  			
  			</div>
 		</div>
 	</div>
	
   

</body>

</html>